package com.tvunetworks.center.user.model;

import java.security.SecureRandom;
import java.util.UUID;

/**
 * id生成器
 * @description: GridEventRecord
 * @author lebronchen
 * @create: 2020-01-07 18:50
 **/
public class IdGenerator {

	private static SecureRandom RANDOM = new SecureRandom();
	
	/**
	 * 封装JDK自带的UUID, 通过Random数字生成, 中间无-分割.
	 * @return  String
	 */

	public static String createId() {
		return UUID.randomUUID().toString().replaceAll("-", "");
	}
	
	/**
	 * 使用SecureRandom随机生成Long.
	 * @return  String
	 */
	/*public static long createRandomLong() {
		return Math.abs(RANDOM.nextLong());
	}*/
	
}
